package com.company.cloud.mall.modules.api.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.mall.modules.api.fallback.MallOrderRemoteServiceFallbackFactory;
import com.company.cloud.mall.modules.api.response.OrderModel;
import com.company.cloud.mall.modules.api.response.OrderRefundsModel;
import com.company.cloud.mall.modules.api.response.OrderReturnsModel;
import com.company.common.server.constant.ServiceNameConstant;

@FeignClient(contextId = "order1", name = ServiceNameConstant.prd_center, fallbackFactory =MallOrderRemoteServiceFallbackFactory.class)
public interface MallOrderRemoteService {

	
	@RequestMapping(value = "/remote/order/orderById", method = RequestMethod.GET)
	public BaseClientResult<OrderModel> orderById(@RequestParam("sn") String sn);
	
	@RequestMapping(value = "/remote/order/orderRefundsById", method = RequestMethod.GET)
	public BaseClientResult<OrderRefundsModel> orderRefundsById(@RequestParam("sn") String sn);
	
	@RequestMapping(value = "/remote/order/orderReturnsById", method = RequestMethod.GET)
	public BaseClientResult<OrderReturnsModel> orderReturnsById(@RequestParam("sn") String sn);
	
}
